using UnityEngine;

namespace Voodoo.Sauce.Internal.Utils
{
	public class LanguageUtils
	{
		public static string Get2LetterISOCodeFromSystemLanguage(SystemLanguage lang)
		{
			string text = "EN";
			switch (lang)
			{
			case SystemLanguage.Afrikaans:
				text = "AF";
				break;
			case SystemLanguage.Arabic:
				text = "AR";
				break;
			case SystemLanguage.Basque:
				text = "EU";
				break;
			case SystemLanguage.Belarusian:
				text = "BY";
				break;
			case SystemLanguage.Bulgarian:
				text = "BG";
				break;
			case SystemLanguage.Catalan:
				text = "CA";
				break;
			case SystemLanguage.ChineseTraditional:
				text = "zh-Hant";
				break;
			case SystemLanguage.ChineseSimplified:
				text = "zh-Hans";
				break;
			case SystemLanguage.Czech:
				text = "CS";
				break;
			case SystemLanguage.Danish:
				text = "DA";
				break;
			case SystemLanguage.Dutch:
				text = "NL";
				break;
			case SystemLanguage.English:
				text = "EN";
				break;
			case SystemLanguage.Estonian:
				text = "ET";
				break;
			case SystemLanguage.Faroese:
				text = "FO";
				break;
			case SystemLanguage.Finnish:
				text = "FI";
				break;
			case SystemLanguage.French:
				text = "FR";
				break;
			case SystemLanguage.German:
				text = "DE";
				break;
			case SystemLanguage.Greek:
				text = "EL";
				break;
			case SystemLanguage.Hebrew:
				text = "IW";
				break;
			case SystemLanguage.Hungarian:
				text = "HU";
				break;
			case SystemLanguage.Icelandic:
				text = "IS";
				break;
			case SystemLanguage.Indonesian:
				text = "IN";
				break;
			case SystemLanguage.Italian:
				text = "IT";
				break;
			case SystemLanguage.Japanese:
				text = "JA";
				break;
			case SystemLanguage.Korean:
				text = "KO";
				break;
			case SystemLanguage.Latvian:
				text = "LV";
				break;
			case SystemLanguage.Lithuanian:
				text = "LT";
				break;
			case SystemLanguage.Norwegian:
				text = "NO";
				break;
			case SystemLanguage.Polish:
				text = "PL";
				break;
			case SystemLanguage.Portuguese:
				text = "PT";
				break;
			case SystemLanguage.Romanian:
				text = "RO";
				break;
			case SystemLanguage.Russian:
				text = "RU";
				break;
			case SystemLanguage.SerboCroatian:
				text = "SH";
				break;
			case SystemLanguage.Slovak:
				text = "SK";
				break;
			case SystemLanguage.Slovenian:
				text = "SL";
				break;
			case SystemLanguage.Spanish:
				text = "ES";
				break;
			case SystemLanguage.Swedish:
				text = "SV";
				break;
			case SystemLanguage.Thai:
				text = "TH";
				break;
			case SystemLanguage.Turkish:
				text = "TR";
				break;
			case SystemLanguage.Ukrainian:
				text = "UK";
				break;
			case SystemLanguage.Unknown:
				text = "EN";
				break;
			case SystemLanguage.Vietnamese:
				text = "VI";
				break;
			}
			return text.ToLowerInvariant();
		}
	}
}
